

<!--<!DOCTYPE HTML>
<html lang="en-US">

<head>
    <meta charset="UTF-8">
    <title>ueditor demo</title>
</head>-->

<!--<a href="#/layui/meetList" class="layui-btn layui-btn-xs layui-btn-primary" style="margin: 20px 0 0 100px;">
  <i class="layui-icon">&#xe65c;</i>
</a>-->

<form action="" class="layui-form">
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-row">
		    <div class="layui-col-xs12">
		    	<div class="layui-card-header"><h2>修改密码</h2>
		      	</div>
		      	<div class="layui-card-body">
		      
		      	<!--<div class="layui-card-body">-->
		      		<div class="layui-form-item">
		      			<div class="layui-form-label">新密码：<span class="haveTo">*</span></div>
		      			<div class="layui-input-block">
		      				<input type="text" name="meetName" lay-verify="required" class="layui-input pwd" >
		      			</div>
		      		</div>
		      		<div class="layui-form-item">
		      			<div class="layui-form-label">确认密码：<span class="haveTo">*</span></div>
		      			<div class="layui-input-block">
		      				<input type="text" lay-verify="required" class="layui-input pwd2">
		      			</div>
		      		</div>
			      </div>	
		    </div>
		    
		    <div class="layui-col-md10">
		    	<div class="addFHBtn">
		    		<!--lay-submit-->
		    		<a class="layui-btn meetBtn layui-btn-primary" href="#/layui/managerList">返回</a>
					<button class="layui-btn confirm meetBtn" type="button" lay-submit lay-filter="queding" >确定</button>
					
				</div>
		    </div>
    	</div>
	</div>
</form>

	
      
      
<script>
	let meetName = document.querySelector(".meetName");
	let startTime = document.querySelector(".startTime");
	let prodInfo = document.querySelector(".prodInfo");
	let confirm = document.querySelector(".confirm");
	let pwd = document.querySelector(".pwd");
	let pwd2 = document.querySelector(".pwd2");
	
	layui.use(['jquery', 'mockjs', 'table', 'sidebar', 'form','route'], function () {
			var $ = layui.jquery,
	      layer = layui.layer,
	      table = layui.table,
	      sidebar = layui.sidebar,
	      laydate = layui.laydate,
	      route = layui.route,
	      params = route.params(),
	      layedit = layui.layedit,
	      form = layui.form;
	       
	      console.log(1,params.id)
	      
	      let _obj = {
	      }
		  function _confirm(){
		  	if($(".pwd").val()!=$(".pwd2").val()){
		  		let index = layer.alert('输入密码和确认密码不相符',function(){
		  			layer.close(index)
		  		})
		  	}else if($(".pwd").val()==$(".pwd2").val()){
		  		console.log($(".pwd").val())
		  		DBHelper.Post("UpdateXn_UserPwd?id="+params.id+"&Pwd="+$(".pwd").val(),{},function(data){
		  			console.log(data)
		  			let index = layer.alert("操作成功",function(){
						window.location.href="#/layui/managerList";
						layer.close(index)
					})
		  		},function(data){
		  			console.log(data)
		  			let index = layer.alert("操作失败",function(){
						location.href = window.location.href
						layer.close(index)
					})
		  		})
		  	}
//		  	if(params == null) {
//		  		_obj.CreateTime = getNowFormatDate();
//		  		_obj.CreateUser = localStorage.getItem("user");
//		  		
//		  		
//		  		_obj.Guid = "00000000-0000-0000-0000-000000000000";
//		  		console.log("_obj",_obj)
//		  		
////		  		console.log("layedit.getContent(index)",layedit.getContent(index))
//		  		
//		  		DBHelper.Post("Admin_Xn_Meeting",_obj,function(data){
//		  			let index = layer.alert("操作成功",function(){
//						window.location.href="#/layui/meetList";
//						layer.close(index)
//					})
//		  		},function(data){
//		  			console.log(data)
//		  		})
//		  	}else{
//		  		_obj.ModifyTime = getNowFormatDate();
//		  		_obj.Guid = params.id;
//		  		_obj.ModifyUser = localStorage.getItem("user");
//		  		
////		  		console.log(_obj)
//		  		
//		  		DBHelper.Put("Admin_Xn_Meeting?id=" + params.id, _obj, function(data) {
//		  			console.log(data)
//		  			let index = layer.alert("操作成功",function(){
//						window.location.href="#/layui/meetList";
//						layer.close(index)
//					})
//					}, function(data) {
//						console.log(data)
//					})
//		  	}
		 }
			form.on('submit(queding)',_confirm);
		  
	})
</script>

<style scoped>
		.haveTo{
			color: red;
		}
		.meetInfo{
			position: relative;
		}
		.fr{
			float: right;
		}
		.fl{
			float: left;
		}
		.clearfix::after{
			content: "";
			display: block;
			width: 100%;
			height: 0;
			clear: both;
		}
		.meetIntro{
			position: relative;
		}
		.limit{
			position: absolute;
			bottom: 5px;
			right: 10px;
		}
      	.title{
      		margin-left: 30px;
      		margin-top: 30px;
      	}
      	.checkBtn{
      		border-radius: 5px;
      		width: 100px;
      	}
      	.listBtns{
      		display: flex;
      		justify-content: space-between;
      		width: 100%;
      	}
      	.listBtn{
      		border-radius: 5px;
      	}
      	.addFHBtn{
      		text-align: center;
      		margin-top: 20px;
      		margin-bottom: 20px;
      	}
      	/*.addFHBtn button{
      		display: inline-block;
      		width: 300px;
      	}*/
      	.meetBtn{
      		width: 150px;
      	}
      </style>